# -*- coding: utf-8 -*-
# @Date    : 2017-05-18 21:08:09
# @Author  : fancy (fancy@thecover.co)
import time
import requests
import threading

def test_coroutine():
    print 'start co %s' % time.strftime('%Y-%m-%d %H:%M:%s', time.localtime())
    url = 'http://localhost:8889'
    res = requests.get(url)
    print 'stop co %s' % time.strftime('%Y-%m-%d %H:%M:%s', time.localtime())

def test_normal():
    print 'start n %s' % time.strftime('%Y-%m-%d %H:%M:%s', time.localtime())
    url = 'http://localhost:8889/hello'
    res = requests.get(url)
    print 'stop n %s' % time.strftime('%Y-%m-%d %H:%M:%s', time.localtime())


if __name__ == '__main__':
    t1 = threading.Thread(target=test_coroutine)
    t2 = threading.Thread(target=test_normal)
    t1.start()
    t2.start()
    t1.join()
